/* 基础样式 */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  color: #606266;
}

/* 滚动条美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 4px;
}

/* 通用容器样式 */
.page-container {
  padding: 16px;
}

.page-title {
  margin-bottom: 20px;
  font-weight: bold;
  color: #303133;
}

/* 卡片容器 */
.card-container {
  margin-bottom: 20px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

/* 统一卡片阴影 */
.el-card {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.08) !important;
}

/* 统一按钮间距 */
.el-button + .el-button {
  margin-left: 10px;
}

/* 操作按钮区域 */
.operation-container {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

.btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 分页区域 */
.pagination-container {
  margin-top: 20px;
  text-align: right;
}

/* 空数据容器 */
.empty-container {
  padding: 40px 0;
  background-color: #fff;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  text-align: center;
}

/* 表单响应式布局 */
.responsive-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-item {
  margin-bottom: 10px;
  margin-right: 0;
}

.form-btn-group {
  display: flex;
  gap: 10px;
  margin-right: 0;
  margin-bottom: 10px;
}

/* 对话框底部按钮 */
.dialog-footer {
  text-align: right;
}

/* 骨架屏脉冲动画 */
@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.skeleton-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* 移动端适配样式 */
@media (max-width: 767px) {
  .page-container {
    padding: 10px;
  }
  
  .page-title {
    font-size: 18px;
    margin-bottom: 16px;
  }
  
  .form-item {
    width: 100%;
  }
  
  .operation-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-group {
    justify-content: space-between;
  }
  
  .pagination-container {
    text-align: center;
  }
  
  .dialog-footer {
    padding: 0 10px;
  }

  .el-message-box {
    width: 90% !important;
    min-width: 200px !important;
    max-width: 90% !important;
  }
  
  .el-dialog {
    width: 90% !important;
    margin-top: 10vh !important;
  }
  
  .el-pagination {
    white-space: normal !important;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* 对话框内的按钮在移动端增大点击区域 */
  .el-button {
    padding: 10px 16px;
    height: auto;
  }
  
  .mobile-footer {
    display: flex;
    justify-content: space-around;
  }
  
  /* 全局优化触摸体验 */
  button, 
  [role="button"], 
  .el-button {
    min-height: 44px; /* 触摸目标的最小高度 */
  }
  
  input, 
  select, 
  .el-input__inner, 
  .el-select__input {
    font-size: 16px !important; /* 防止iOS缩放 */
  }
  
  /* 优化滚动 */
  * {
    -webkit-overflow-scrolling: touch;
  }
}

/* 移除内容居中 */
body {
  margin: 0;
  padding: 0;
}

/* 平板适配样式 */
@media (min-width: 768px) and (max-width: 991px) {
  .form-item {
    width: calc(50% - 5px);
  }
}

/* 桌面适配样式 */
@media (min-width: 992px) {
  .form-item {
    margin-right: 10px;
  }
}

/* 动画效果 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

/* 骨架屏渐变动画 */
.skeleton-fade-enter-active,
.skeleton-fade-leave-active {
  transition: opacity 0.3s;
}

.skeleton-fade-enter,
.skeleton-fade-leave-to {
  opacity: 0;
}

/* 修复Element UI在移动端的一些问题 */
.el-message {
  width: auto !important;
  min-width: 200px !important;
  max-width: 90% !important;
}

.el-message-box {
  width: 90% !important;
  max-width: 420px !important;
} 